import { defineAsyncComponent } from 'vue'
// 要异步导入的全局组件
const asyncComponentPathArr = [
  // 1-报修详情
  {
    name: 'repairRepairManageRepairOrderDetails',
    path: () =>
      import('/src/views/repair/repairManage/repairOrder/details.vue'),
  },
  // 1-报修编辑
  {
    name: 'repairRepairManageRepairOrderModify',
    path: () => import('/src/views/repair/repairManage/repairOrder/modify.vue'),
  },
  // 2-财务类别详情
  {
    name: 'financeTypeAdjustDetails',
    path: () =>
      import('/src/views/asset/assetManage/financeTypeAdjust/details.vue'),
  },
  // 2-财务类别编辑
  {
    name: 'financeTypeAdjustModify',
    path: () =>
      import('/src/views/asset/assetManage/financeTypeAdjust/modify.vue'),
  },
  // 3-资产原值调整详情
  {
    name: 'originalAmountAdjustDetails',
    path: () =>
      import('/src/views/asset/assetManage/originalAmountAdjust/details.vue'),
  },
  // 3-资产原值调整编辑
  {
    name: 'originalAmountAdjustModify',
    path: () =>
      import('/src/views/asset/assetManage/originalAmountAdjust/modify.vue'),
  },
  // 4-资产退库详情
  {
    name: 'assetReturnDepotDetails',
    path: () =>
      import('/src/views/asset/assetManage/assetReturnDepot/details.vue'),
  },
  // 4-资产退库编辑
  {
    name: 'assetReturnDepotModify',
    path: () =>
      import('/src/views/asset/assetManage/assetReturnDepot/modify.vue'),
  },
  // 5-资产采购详情
  {
    name: 'assetPurchDetails',
    path: () => import('/src/views/asset/assetManage/assetPurch/detail.vue'),
  },
  // 5-资产采购编辑
  {
    name: 'assetPurchModify',
    path: () => import('/src/views/asset/assetManage/assetPurch/modify.vue'),
  },
  // 6-采购发票详情
  {
    name: 'assetPurchInvoiceDetails',
    path: () => import('/src/views/assetReceiptManage/purchInvoice/detail.vue'),
  },
  // 6-采购发票编辑
  {
    name: 'assetPurchInvoiceModify',
    path: () => import('/src/views/assetReceiptManage/purchInvoice/modify.vue'),
  },
  // 7-资产卡片详情
  {
    name: 'assetCardDetails',
    path: () => import('/src/views/asset/assetManage/assetCard/details.vue'),
  },
  // 7-资产卡片编辑
  {
    name: 'assetCardModify',
    path: () => import('/src/views/asset/assetManage/assetCard/modify.vue'),
  },
  // 8-资产入库详情
  {
    name: 'assetStoreDetails',
    path: () => import('/src/views/asset/assetManage/assetStore/detail.vue'),
  },
  // 8-资产入库编辑
  {
    name: 'assetStoreModify',
    path: () => import('/src/views/asset/assetManage/assetStore/index.vue'),
  },
  // 9-资产移库详情
  {
    name: 'assetMoveDepotDetails',
    path: () =>
      import('/src/views/asset/assetManage/assetMoveDepot/details.vue'),
  },
  // 9-资产移库编辑
  {
    name: 'assetMoveDepotModify',
    path: () =>
      import('/src/views/asset/assetManage/assetMoveDepot/modify.vue'),
  },
  // 10-资产处置详情
  {
    name: 'assetDealDetails',
    path: () => import('/src/views/asset/assetManage/assetDeal/details.vue'),
  },
  // 10-资产处置编辑
  {
    name: 'assetDealModify',
    path: () => import('/src/views/asset/assetManage/assetDeal/index.vue'),
  },
  // 11-资产转移详情
  {
    name: 'assetTransferDetails',
    path: () =>
      import('/src/views/asset/assetManage/assetTransfer/details.vue'),
  },
  // 11-资产转移编辑
  {
    name: 'assetTransferModify',
    path: () => import('/src/views/asset/assetManage/assetTransfer/modify.vue'),
  },
  // 12-资产领用出库详情
  {
    name: 'assetUseExportDetails',
    path: () =>
      import('/src/views/asset/assetManage/assetUseExport/detail.vue'),
  },
  // 12-资产领用出库编辑
  {
    name: 'assetUseExportModify',
    path: () =>
      import('/src/views/asset/assetManage/assetUseExport/modify.vue'),
  },
  // 13-资产付款详情
  {
    name: 'paymentDetails',
    path: () => import('/src/views/assetReceiptManage/payment/detail.vue'),
  },
  // 13-资产付款编辑
  {
    name: 'paymentModify',
    path: () => import('/src/views/assetReceiptManage/payment/modify.vue'),
  },
  // 14-不良事件上报详情
  {
    name: 'adverseEventDetails',
    path: () => import('/src/views/quality/adverseEvent/details.vue'),
  },
  // 14-不良事件上报编辑
  {
    name: 'adverseEventModify',
    path: () => import('/src/views/quality/adverseEvent/modify.vue'),
  },
  // 15-耗材调价详情
  {
    name: 'adjustOrderDetail',
    path: () =>
      import('/src/views/collaborativeApproval/adjustPrice/detail.vue'),
  },
  // 15-耗材调价编辑
  {
    name: 'adjustOrderSubmit',
    path: () =>
      import('/src/views/collaborativeApproval/adjustPrice/modify.vue'),
  },
  // 16-设备试用详情
  {
    name: 'deviceTrialManageDetail',
    path: () =>
      import(
        '/src/views/asset/equipmentUseManage/deviceTrialManage/detail.vue'
      ),
  },
  // 16-设备试用编辑
  {
    name: 'deviceTrialManageModify',
    path: () =>
      import(
        '/src/views/asset/equipmentUseManage/deviceTrialManage/modify.vue'
      ),
  },
  // 17-委外申请详情
  {
    name: 'outsourcingApplicationDetails',
    path: () =>
      import(
        '/src/views/repair/repairManage/outsourcingApplication/details.vue'
      ),
  },
  // 17-委外申请编辑
  {
    name: 'outsourcingApplicationModify',
    path: () =>
      import(
        '/src/views/repair/repairManage/outsourcingApplication/modify.vue'
      ),
  },
  // 18-采购单详情
  {
    name: 'orderDetails',
    path: () => import('/src/views/purch/order/detail.vue'),
  },
  // 18-采购单编辑
  {
    name: 'orderModify',
    path: () => import('/src/views/purch/order/modify.vue'),
  },
  // 19-待审核产品编辑
  {
    name: 'pendCheckProductModify',
    path: () =>
      import('/src/views/collaborativeApproval/pendCheckProduct/modify.vue'),
  },
  // 19-待审核产品详情
  {
    name: 'pendCheckProductDetails',
    path: () =>
      import('/src/views/collaborativeApproval/pendCheckProduct/detail.vue'),
  },
  // 20-产品入院编辑
  {
    name: 'productInHospitalModify',
    path: () =>
      import('/src/views/product/productHospitalized/modify.vue'),
  },
  // 19-产品入院详情
  {
    name: 'productInHospitalDetails',
    path: () =>
      import('/src/views/product/productHospitalized/details.vue'),
  },
  // 19-待审核机构编辑
  // {
  //   name: 'pendCheckProductModify',
  //   path: () =>
  //     import('/src/views/collaborativeApproval/pendCheckOrgInfo/modify.vue'),
  // },
  // 19-待审核机构详情
  {
    name: 'pendCheckOrgInfoDetail',
    path: () =>
      import('/src/views/collaborativeApproval/pendCheckOrgInfo/detail.vue'),
  },
  // 19-待审核厂家详情
  {
    name: 'pendCheckBrandDetail',
    path: () =>
      import('/src/views/collaborativeApproval/pendCheckBrand/detail.vue'),
  },
   // 20-待审核证照详情
   {
    name: 'pendCheckLicenseDetail',
    path: () =>
      import('/src/views/collaborativeApproval/pendCheckLicense/detail.vue'),
  },
   // 21-采购计划详情
  {
    name: 'purchPlanDetails',
    path: () =>
      import('/src/views/purch/purchPlan/detail.vue'),
  },
   // 22-采购计划编辑
  {
    name: 'purchPlanModify',
    path: () =>
      import('/src/views/purch/purchPlan/modify.vue'),
  },
   // 21-报废出库详情
  {
    name: 'scrapExportOrderDetail',
    path: () =>
      import('/src/views/stock/scrap/detail.vue'),
  },
   // 22-报废出库编辑
  {
    name: 'scrapExportOrderModify',
    path: () =>
      import('/src/views/stock/scrap/modify.vue'),
  },
]

function installFlow(app) {
  asyncComponentPathArr.forEach((item) => {
    app.component(item.name, defineAsyncComponent(item.path))
  })
}
export { installFlow }
